import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/textLogin'
import Home from '@/views/home'
import Setting from '@/views/Setting'
import UserSave from '@/views/userSave'
import PlaceOrder from '@/views/placeOrder'
import ClientRelations from '@/views/clientRelations'
import OrderContract from '@/views/orderContract'
import ProductOperate from '@/views/ProductOperate'
import CustomerProduct from '@/views/customerProduct'
import OperationApproval from '@/views/ProductOperate/OperationApproval'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/setting',
    component: Setting
  },
  {
    path: '/userSave',
    component: UserSave
  },
  {
    path: '/placeOrder',
    component: PlaceOrder
  },
  {
    path: '/clientRelations',
    component: ClientRelations
  },
  {
    path: '/orderContract',
    component: OrderContract
  },
  {
    path: '/productoperate',
    component: ProductOperate
  },
  {
    path: '/customerProduct',
    component: CustomerProduct
  },
  {
    path: '/cperationApproval',
    component: OperationApproval
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
